package com.ruoyi.ax.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ax.mapper.AxBannerMapper;
import com.ruoyi.ax.domain.AxBanner;
import com.ruoyi.ax.service.IAxBannerService;

/**
 * banner图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class AxBannerServiceImpl implements IAxBannerService 
{
    @Autowired
    private AxBannerMapper axBannerMapper;

    /**
     * 查询banner图片
     * 
     * @param id banner图片主键
     * @return banner图片
     */
    @Override
    public AxBanner selectAxBannerById(Long id)
    {
        return axBannerMapper.selectAxBannerById(id);
    }

    /**
     * 查询banner图片列表
     * 
     * @param axBanner banner图片
     * @return banner图片
     */
    @Override
    public List<AxBanner> selectAxBannerList(AxBanner axBanner)
    {
        return axBannerMapper.selectAxBannerList(axBanner);
    }

    /**
     * 新增banner图片
     * 
     * @param axBanner banner图片
     * @return 结果
     */
    @Override
    public int insertAxBanner(AxBanner axBanner)
    {
        axBanner.setCreateTime(DateUtils.getNowDate());
        return axBannerMapper.insertAxBanner(axBanner);
    }

    /**
     * 修改banner图片
     * 
     * @param axBanner banner图片
     * @return 结果
     */
    @Override
    public int updateAxBanner(AxBanner axBanner)
    {
        axBanner.setUpdateTime(DateUtils.getNowDate());
        return axBannerMapper.updateAxBanner(axBanner);
    }

    /**
     * 批量删除banner图片
     * 
     * @param ids 需要删除的banner图片主键
     * @return 结果
     */
    @Override
    public int deleteAxBannerByIds(Long[] ids)
    {
        return axBannerMapper.deleteAxBannerByIds(ids);
    }

    /**
     * 删除banner图片信息
     * 
     * @param id banner图片主键
     * @return 结果
     */
    @Override
    public int deleteAxBannerById(Long id)
    {
        return axBannerMapper.deleteAxBannerById(id);
    }
}
